package com.dbl.oms.platform.persistence.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.dbl.oms.common.model.SuperEntity;

/**
 * <p>
 * 资源模块
 * </p>
 *
 * @author Ladd
 * @since 2017-12-15
 */
@TableName("sys_resource")
public class SysResource extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 资源id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 名称
     */
	private String name;
    /**
     * 类型。1：导航兰，2：按钮，3：权限
     */
	private String type;
    /**
     * 权重
     */
	private Integer priority;
    /**
     * 地址
     */
	private String url;
    /**
     * 父资源id
     */
	@TableField("parent_id")
	private Integer parentId;
    /**
     * 授权名称
     */
	private String sn;
    /**
     * 图标样式
     */
	private String icon;
    /**
     * 描述
     */
	private String remark;
    /**
     * 排序编号
     */
	@TableField("order_num")
	private Integer orderNum;
    /**
     * 创建人
     */
	@TableField("create_by")
	private String createBy;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;


	public Integer getId() {
		return id;
	}

	public SysResource setId(Integer id) {
		this.id = id;
		return this;
	}

	public String getName() {
		return name;
	}

	public SysResource setName(String name) {
		this.name = name;
		return this;
	}

	public String getType() {
		return type;
	}

	public SysResource setType(String type) {
		this.type = type;
		return this;
	}

	public Integer getPriority() {
		return priority;
	}

	public SysResource setPriority(Integer priority) {
		this.priority = priority;
		return this;
	}

	public String getUrl() {
		return url;
	}

	public SysResource setUrl(String url) {
		this.url = url;
		return this;
	}

	public Integer getParentId() {
		return parentId;
	}

	public SysResource setParentId(Integer parentId) {
		this.parentId = parentId;
		return this;
	}

	public String getSn() {
		return sn;
	}

	public SysResource setSn(String sn) {
		this.sn = sn;
		return this;
	}

	public String getIcon() {
		return icon;
	}

	public SysResource setIcon(String icon) {
		this.icon = icon;
		return this;
	}

	public String getRemark() {
		return remark;
	}

	public SysResource setRemark(String remark) {
		this.remark = remark;
		return this;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public SysResource setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
		return this;
	}

	public String getCreateBy() {
		return createBy;
	}

	public SysResource setCreateBy(String createBy) {
		this.createBy = createBy;
		return this;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public SysResource setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}

	public static final String ID = "id";

	public static final String NAME = "name";

	public static final String TYPE = "type";

	public static final String PRIORITY = "priority";

	public static final String URL = "url";

	public static final String PARENT_ID = "parent_id";

	public static final String SN = "sn";

	public static final String ICON = "icon";

	public static final String REMARK = "remark";

	public static final String ORDER_NUM = "order_num";

	public static final String CREATE_BY = "create_by";

	public static final String CREATE_TIME = "create_time";

	@Override
	public String toString() {
		return "SysResource{" +
			", id=" + id +
			", name=" + name +
			", type=" + type +
			", priority=" + priority +
			", url=" + url +
			", parentId=" + parentId +
			", sn=" + sn +
			", icon=" + icon +
			", remark=" + remark +
			", orderNum=" + orderNum +
			", createBy=" + createBy +
			", createTime=" + createTime +
			"}";
	}
}
